@extends('admin.layouts.app')

@section('content')
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
        <div class="box-header">
          <a href="{{ url('/api_admin') }}" class="btn btn-default">返回</a>
        </div>
        <div class="box-body table-responsive no-padding">
          <form class="form-horizontal col-md-6 col-md-offset-3" action="{{ url('/api_admin/profile') }}" method="post">
            {!! csrf_field() !!}
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'name', 'formPlaceholder'=>'姓名'])
            <div class="form-group">
              <label for="inputName" class="col-sm-2 control-label">你是</label>
              <div class="col-sm-2">
                <select class="form-control" name="sex">
                  <option value="male"
                  @if (old('sex') == 'male')
                  selected
                  @endif>男生</option>
                  <option value="female"
                  @if (old('sex') == 'female')
                  selected
                  @endif>女生</option>
                </select>
              </div>
            </div>
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'entry', 'formPlaceholder'=>'职位'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'mail', 'formPlaceholder'=>'邮箱'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'tel', 'formPlaceholder'=>'手机号码'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'birth', 'formPlaceholder'=>'生日'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'edu', 'formPlaceholder'=>'教育'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'address', 'formPlaceholder'=>'地址'])
            @include('admin.layouts.utils.form_check', ['formCheckName'=>'web', 'formPlaceholder'=>'个人主页'])
            <div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
              <label for="notes" class="col-sm-2 control-label">个人描述</label>
              <div class="col-sm-10">
                <textarea class="form-control" id="notes" placeholder="个人描述" name="notes">{{ old('notes') }}</textarea>
                @if ($errors->has('notes'))
                  <span class="help-block">
                    <strong>{{ $errors->first('notes') }}</strong>
                  </span>
                @endif
              </div>
            </div>
            <div class="form-group {{ $errors->has('skills') ? ' has-error' : '' }}">
              <label for="skills" class="col-sm-2 control-label">个人能力</label>

              <div class="col-sm-10">
                <input type="text" class="form-control" id="skills" placeholder="个人能力" name="skills" value="{{ old('skills') }}">
                <span class="help-block">每条能力用逗号分开！</span>
                @if ($errors->has('skills'))
                  <span class="help-block">
                    <strong>{{ $errors->first('skills') }}</strong>
                  </span>
                @endif
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-danger">创建</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>
@endsection
